package com.wu.demo.common.domain.request;

import com.wu.demo.common.validator.Phone;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.Email;
import javax.validation.constraints.Max;
import javax.validation.constraints.Min;

@Data
@ApiModel("用户信息")
public class UserInfo {
    @ApiModelProperty("用户id")
    private Long id;
    @ApiModelProperty("用户名")
    private String userName;

    @ApiModelProperty("密码")
    private String pwd;

    @ApiModelProperty("年龄")
    @Max(value = 200 ,message = "年龄不能超过200")
    @Min(value = 1,message = "年龄不能小于1")
    private Integer age;

    @Phone
    @ApiModelProperty("手机号")
    private String mobile;

    @ApiModelProperty("邮箱")
    @Email(message = "请输入正确的邮箱")
    private String email;
}
